import {SqlBuilder} from "../expressExt/db/SqlBuilder";
import {TimeEvent} from "../expressExt/TimeEvent";
import {Menu} from "../expressExt/Menu";

export class Tasks {

    static startAll() {
        Menu.createTemp()
        Tasks.clearCache.start();
    }
    
    /**
     * 每天3点清空所有表缓存
     */
    static clearCache = TimeEvent.dailyEvent(3, 0, e=> {
        SqlBuilder.clearAllCache();
        Menu.clearTemp()
    });

}